From: Aaron Schulz Date: Thu, 17 Apr 2008 21:17:28 +0000 (+0000) Subject: Add user_last_timestamp field for diff from last view links. Discussed timestamp... X-Git-Tag: 1.31.0-rc.0~48220 X-Git-Url: http://git.cyclocoop.org/%7D%7Cconcat%7B?a=commitdiff_plain;h=3c60497de2c511154fbf121331a09ab3a768780d;p=lhc%2Fweb%2Fwiklou.git Add user_last_timestamp field for diff from last view links. Discussed timestamp use for this w/ brion. --- diff --git a/maintenance/archives/patch-user_last_timestamp.sql b/maintenance/archives/patch-user_last_timestamp.sql new file mode 100644 index 0000000000..b6d5f0f358 --- /dev/null +++ b/maintenance/archives/patch-user_last_timestamp.sql @@ -0,0 +1,3 @@ +-- For getting diff since last view +ALTER TABLE /*$wgDBprefix*/user_newtalk + ADD user_last_timestamp binary(14) NOT NULL default ''; diff --git a/maintenance/tables.sql b/maintenance/tables.sql index 7a20ad377c..a9e8907caa 100644 --- a/maintenance/tables.sql +++ b/maintenance/tables.sql @@ -166,6 +166,9 @@ CREATE TABLE /*$wgDBprefix*/user_newtalk ( -- If the user is an anonymous user their IP address is stored here -- since the user_id of 0 is ambiguous user_ip varbinary(40) NOT NULL default '', + -- The highest timestamp of revisions of the talk page viewed + -- by this user + user_last_timestamp binary(14) NOT NULL default '', INDEX user_id (user_id), INDEX user_ip (user_ip) diff --git a/maintenance/updaters.inc b/maintenance/updaters.inc index b8713100ee..3371beb246 100644 --- a/maintenance/updaters.inc +++ b/maintenance/updaters.inc @@ -138,6 +138,7 @@ $wgMysqlUpdates = array( array( 'add_table', 'category', 'patch-category.sql' ), array( 'do_category_population' ), array( 'add_field', 'archive', 'ar_parent_id', 'patch-ar_parent_id.sql'), + array( 'add_field', 'user_newtalk', 'user_last_timestamp', 'patch-user_last_timestamp.sql'), array( 'do_populate_parent_id' ), array( 'check_bin', 'protected_titles', 'pt_title', 'patch-pt_title-encoding.sql', ), );